{extend name="public:base"/}


{block name="title"}编辑优惠劵{/block}
{block name="style"}{/block}

{block name="main"}

<section class="content" xmlns="http://www.w3.org/1999/html">
    <div class="row">

        <div class="col-md-12">

            <div class="row">
                <div class="col-lg-12">
                    <div class="box">
                        <div class="box-header with-border">
                            <h3 class="box-title">编辑优惠劵</h3>
                        </div>
                        <form  id="pt_form" method="post">
                            <div class="box-body">

                                <input type="hidden" name="id" value="<?=$model['id']?>" ?>
                                <div class="clearfix"></div>

     
                                <div class="form-group required">
                                    <div class='col-sm-2 text-right'>
                                        <label for="name" class="control-label Validform_label" >优惠券名称</label>
                                    </div>
                                    <div class='col-sm-10'>
                                        <input type="text" id="name" class="form-control" name="name" placeholder="请输入优惠券名称" value="<?=$model['name']?>" datatype="s2-50" ignore="ignore"  errormsg="优惠券名称超出长度范围">
                                        <div class="help-block"></div>
                                    </div>
                                </div>
          
                                <div class="form-group required">
                                    <div class='col-sm-2 text-right'>
                                        <label for="money" class="control-label Validform_label" >优惠券面额</label>
                                    </div>
                                    <div class='col-sm-10'>
                                        <input type="text" id="money" class="form-control" name="money" placeholder="请输入优惠券面额" value="<?=$model['money']?>" datatype="n" ignore="ignore">
                                        <div class="help-block"></div>
                                    </div>
                                </div>
          
                                <div class="form-group required">
                                    <div class='col-sm-2 text-right'>
                                        <label for="condition" class="control-label Validform_label" >消费金额</label>
                                    </div>
                                    <div class='col-sm-10'>
                                        <input type="text" id="condition" class="form-control" name="condition" placeholder="请输入消费金额" value="<?=$model['condition']?>" datatype="n" >
                                        <div class="help-block"></div>
                                    </div>
                                </div>
          
                                <div class="form-group required">
                                    <div class='col-sm-2 text-right'>
                                        <label for="create_num" class="control-label Validform_label" >发放数量</label>
                                    </div>
                                    <div class='col-sm-10'>
                                        <input type="text" id="create_num" class="form-control" name="create_num" placeholder="请输入发放数量" value="<?=$model['create_num']?>" datatype="n"  errormsg="发放数量是数字类型">
                                        <div class="help-block"></div>
                                    </div>
                                </div>
          
                                <div class="form-group required">
                                    <div class="col-sm-2 text-right">
                                        <label class="control-label Validform_label">状态                                        </label>
                                    </div>

                                    <div class="col-sm-10">
                                        <div>
                                      
                                            <span style="color:#636f7a"><input type="radio"  datatype="*" nullmsg="请选择状态" name="status" value="1" <?=$model['status'] == 1?'checked="checked"':''?> >有效</span>

                                            
                                            <span style="color:#636f7a"><input type="radio" name="status" value="0"  <?=$model['status'] == 0?'checked="checked"':''?>>无效</span>

                                                                                    </div>
                                        <div class="help-block"></div>
                                    </div>
                                </div>


     
                                <div class="form-group required">
                                    <div class='col-sm-2 text-right'>
                                        <label for="use_start_time" class="control-label Validform_label" >使用起始日期</label>
                                    </div>
                                    <div class='col-sm-10'>
                                        <input type="text" id="use_start_time" class="form-control" name="use_start_time" placeholder="使用起始日期" value="<?=$model['use_start_time']?>" datatype="*"  nullmsg="使用起始日期不能为空">
                                        <div class="help-block"></div>
                                    </div>
                                </div>
          
                                <div class="form-group required">
                                    <div class='col-sm-2 text-right'>
                                        <label for="use_end_time" class="control-label Validform_label" >使用结束日期</label>
                                    </div>
                                    <div class='col-sm-10'>
                                        <input type="text" id="use_end_time" class="form-control" name="use_end_time" placeholder="使用结束日期" value="<?=$model['use_end_time']?>" datatype="*"  nullmsg="使用结束日期不能为空">
                                        <div class="help-block"></div>
                                    </div>
                                </div>
                                 </div>
                            <div class="box-footer text-center">
                                <button class="btn btn-primary" type="submit">保存</button>
                                <span class="btn btn-white" onclick="history.go(-1)">返回</span>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</section>
{/block}

{block name="js"}
<script>

    var validate = validator('#pt_form');
    
</script>
{/block}